procedure TIWFuncMiscFrame.IWCGJQButtonRenderJQButtonOptionsClick(Sender: TObject; AURLParams: TStringList);
var
  Dialog: TIWCGJQDialog;
  BoxFrame: TIWFancyBoxFrame;
  n: string;
  i: Integer;
begin
  Dialog:= TIWCGJQDialog.Create(MainForm);

  i:= 0;
  repeat
    inc(i);
    n:= 'Dialog' + IntToStr(i);
  until not Assigned(MainForm.FindComponent(n));
  Dialog.Name:= n;

  Dialog.DisableAjaxResponse;
  Dialog.Parent:= MainForm;
  Dialog.Left:= 300;
  Dialog.Top:= 300;
  Dialog.Width:= 400;
  Dialog.Height:= 400;
  Dialog.JQDialogOptions.Title:= 'Ajax Demo';
  Dialog.JQDialogOptions.Stack:= False;
  Dialog.JQDialogOptions.OnClose.OnEvent:= DialogClose;

  BoxFrame:= TIWFancyBoxFrame.Create(MainForm);
  BoxFrame.Name:= 'BoxFrame' + IntToStr(i);;
  BoxFrame.Parent:= Dialog;

  BoxFrame.ProcessCommand(fbcDefault);

  RenderRegionAsync(Dialog);

  Dialog.EnableAjaxResponse;
end;